home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 2.toast / pc / sample code / quicktime / quicktime for java / custommedia / src / com / vr / vrsampledescription.java < prev   
Encoding:
Java Source  |  2000-09-28  |  2.3 KB  |  76 lines

  1. /*
  2.  * QuickTime for Java SDK Sample Code
  3.  
  4.    Usage subject to restrictions in SDK License Agreement
  5.  * Copyright: © 1996-1999 Apple Computer, Inc.
  6.  
  7.  */
  8. package com.vr;
  9.  
  10. import quicktime.QTException;
  11. import quicktime.std.movies.AtomContainer;
  12. import quicktime.std.movies.media.*;
  13. /**
  14.  * This class represents a description of QTVR media.
  15.  */
  16. public final class VRSampleDescription extends SampleDescription {
  17. //_________________________ CLASS VARIABLES
  18.     private final static int kNativeSize = 20;
  19.     public static final int qtvrMediaType = 0x71747672;  //'qtvr'
  20.     
  21.  
  22. /*                            offset    size
  23.     UInt32     descSize;        0        4                /* total size of the QTVRSampleDescription
  24.     UInt32    descType;        4        4            /* must be 'qtvr'
  25.  
  26.     UInt32    reserved1;        8        4            /* must be zero
  27.     UInt16    reserved2;        12        2            /* must be zero
  28.     UInt16    dataRefIndex;    14        2            /* must be zero
  29.  
  30.     UInt32    data;            16        4    => 20            /* Will be extended to hold vrWorld QTAtomContainer
  31. */
  32.  
  33. //_________________________ CLASS METHODS
  34.     /** This constructor makes a new VRDescription object.    */
  35.     public VRSampleDescription () throws QTException{
  36.         super (kNativeSize, true, qtvrMediaType);
  37.     }
  38.     
  39.     private VRSampleDescription (int hand) {
  40.         super (hand, null, false);
  41.     }
  42.     
  43. //_________________________ INSTANCE METHODS
  44.     /** Implementation of Cloneable Interface.    */
  45.     public Object clone() { return new VRSampleDescription (makeAndCopyHandle ()); }
  46.  
  47.     /**
  48.      * Returns the AtomContainer that is at the end of the Media structure.
  49.      * It allows you to edit the contents of this atom container that is attached
  50.      * to the description - it edits in place, rather than returning you a copy.
  51.      * @return the VRWorld atom container.
  52.      *
  53.     public AtomContainer getVRWorld () {
  54.         return MediaMoviesAccess.makeAtomContainer (getIntAt(16), this);
  55.     }*/
  56. }
  57.  
  58. /*
  59.  * $Log: /Biscotti/QTJavaDemos/CustomMedia/src/com/vr/VRSampleDescription.java $
  60.  * 
  61.  * 5     3/11/99 5:32 PM Roger Smith
  62.  * Update Source License Agreement
  63.  * 
  64.  * 2     6/30/98 11:57 PM Roger Smith
  65.  * change com.qt to quicktime to reflect new package naming scheme
  66.  * 
  67.  * 1     29/4/98 3:11 PM Bill Stewart
  68.  * Adding subproject 'QTJavaDemos' to '$/Biscotti'
  69.  * 
  70.  * 1     22/4/98 5:46 PM Bill Stewart
  71.  * Adding subproject 'QTJavaDemos' to '$/Biscotti'
  72.  * 
  73.  * 1     15/4/98 6:49 PM Bill Stewart
  74.  * Adding subproject 'VR Media' to '$/Biscotti/Projects'
  75.  */
  76.